from rest_framework.response import Response

# @功能：class APIRespons
# @说明：扩写APIRespons
# @作者：xiao
# @日期：2021/09/24
class APIRespons(Response):

    def __init__(self, status=200, msg='ok', http_status=None, headers=None, exception=False, **kwargs):
        data = {
            'status': status,
            'msg': msg,
        }
        if kwargs:
            data.update(kwargs)
        super().__init__(data=data, status=http_status, headers=headers, exception=exception)

